<script type="text/javascript">
	{literal}
function toggleStatus(obj, urlValue) {
	$(obj).attr('disabled', 'disabled');
	$.ajax({
		url: urlValue ,
		type:'GET',
		success: function(){
			$(obj).removeAttr('disabled');
		}
	});
}
	{/literal}
</script>
<h1>Moderujesz komentarz</h1>

{mainoptions title="Dane ogólne"}
<form action="{url Comments=Edit id=$comment->getId()}" method="post">
	<table cellpadding="0" cellspacing="0" width="100%" class="commonTable">
		<tr>
			<th>Publikuj</th>
			<td>
				<input type="checkbox" {if $comment->getActive() == 1}checked="checked"{/if} onchange="toggleStatus(this, '{url Comments=ToggleStatus id=$comment->getId()}');"/>
			</td>
		</tr>
		<tr>
			<th>Tytuł</th>
			<td><input type="text" value="{$comment->getTitle()}" name="title" /></td>
		</tr>
		<tr>
			<th>Treść</th>
			<td>{insertFckEditor name=content value=$comment->getContent()}</td>
		</tr>
	</table>
		<p align="right">
			<input type="submit" value="Anuluj" class="cancel" onclick="document.location.href='{url Comments='Index'}'; return false;" />
			<input type="submit" value="Zapisz i przejdź do listy" />
		</p>

</form>
{/mainoptions}